// 页面模板样式 - 统一的页面布局和组件样式

// 页面容器基础样式
.page-container {
  background: linear-gradient(135deg, #0f1327 0%, #1a2332 100%);
  min-height: 100vh;
  color: #e6e6e6;
  padding: 20px 20px 80px 20px;
  /* 增加底部边距避免Footer遮挡 */
}

// 技术风格按钮
.tech-button {
  background: linear-gradient(135deg, #00eaff 0%, #0099cc 100%) !important;
  border: none !important;
  color: #fff !important;
  padding: 8px 16px !important;
  border-radius: 8px !important;
  font-weight: 500 !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 2px 8px rgba(0, 234, 255, 0.2) !important;

  &:hover {
    background: linear-gradient(135deg, #33f0ff 0%, #00b8e6 100%) !important;
    box-shadow: 0 4px 15px rgba(0, 234, 255, 0.4) !important;
    transform: translateY(-1px) !important;
  }

  &:active {
    transform: translateY(0) !important;
  }

  i {
    margin-right: 6px;
  }

  // 次要按钮样式
  &.tech-button-secondary {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(0, 234, 255, 0.3) !important;
    color: #e6e6e6 !important;

    &:hover {
      border-color: rgba(0, 234, 255, 0.6) !important;
      background: rgba(0, 234, 255, 0.1) !important;
    }
  }

  // 危险按钮样式
  &.tech-button-danger {
    background: linear-gradient(135deg, #f56c6c 0%, #e74c3c 100%) !important;

    &:hover {
      background: linear-gradient(135deg, #ff7675 0%, #e55353 100%) !important;
      box-shadow: 0 4px 15px rgba(245, 108, 108, 0.4) !important;
    }
  }
}

// 技术风格输入框
.tech-input {
  :deep(.el-input__wrapper) {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    border-radius: 8px !important;

    &:hover {
      border-color: rgba(0, 234, 255, 0.3) !important;
    }

    &.is-focus {
      border-color: #00eaff !important;
      box-shadow:
        inset 0 1px 3px rgba(0, 0, 0, 0.1),
        0 0 10px rgba(0, 234, 255, 0.3) !important;
    }

    .el-input__inner {
      color: white !important;
      background: transparent !important;

      &::placeholder {
        color: rgba(255, 255, 255, 0.5) !important;
      }
    }
  }
}

// 技术风格表格
.tech-table {
  :deep(.el-table) {
    background: transparent !important;
    color: #e6e6e6 !important;

    .el-table__header {
      background: rgba(0, 234, 255, 0.1) !important;

      th {
        background: transparent !important;
        color: #00eaff !important;
        border-color: rgba(0, 234, 255, 0.2) !important;
        font-weight: 600 !important;
      }
    }

    .el-table__body {
      tr {
        background: transparent !important;

        &:hover {
          background: rgba(0, 234, 255, 0.05) !important;
        }

        &.el-table__row--striped {
          background: rgba(255, 255, 255, 0.02) !important;

          &:hover {
            background: rgba(0, 234, 255, 0.05) !important;
          }
        }

        td {
          border-color: rgba(255, 255, 255, 0.1) !important;
          color: #e6e6e6 !important;
        }
      }
    }
  }
}

// 技术风格表单
.tech-form {
  :deep(.el-form-item__label) {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500 !important;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.1) !important;
  }

  :deep(.el-form-item__error) {
    color: #ff6b6b !important;
    font-size: 12px !important;
    margin-top: 4px !important;
  }
}

// 技术风格对话框
.tech-dialog {
  :deep(.el-dialog) {
    background: rgba(30, 60, 114, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
    border-radius: 12px !important;
  }

  :deep(.el-dialog__header) {
    background: rgba(0, 234, 255, 0.1) !important;
    border-bottom: 1px solid rgba(0, 234, 255, 0.2) !important;
    border-radius: 12px 12px 0 0 !important;
    padding: 20px !important;

    .el-dialog__title {
      color: #00eaff !important;
      font-weight: 600 !important;
      font-size: 18px !important;
      text-shadow: 0 0 10px rgba(0, 234, 255, 0.3) !important;
    }
  }

  :deep(.el-dialog__body) {
    padding: 20px !important;
    color: #e6e6e6 !important;
  }

  :deep(.el-dialog__footer) {
    background: rgba(0, 0, 0, 0.2) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 0 0 12px 12px !important;
    padding: 15px 20px !important;
  }
}

// 玻璃卡片效果
.glass-card {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(10px) !important;
  border-radius: 12px !important;
  padding: 20px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
  transition: all 0.3s ease !important;

  &:hover {
    border-color: rgba(0, 234, 255, 0.3) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4) !important;
  }
}

// 环境标签样式
.environment-tag {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: white;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);

  &.dev {
    background: linear-gradient(135deg, #409eff, #5dade2);
    box-shadow: 0 2px 8px rgba(64, 158, 255, 0.3);
  }

  &.test {
    background: linear-gradient(135deg, #67c23a, #82e7ab);
    box-shadow: 0 2px 8px rgba(103, 194, 58, 0.3);
  }

  &.staging {
    background: linear-gradient(135deg, #e6a23c, #f4d03f);
    box-shadow: 0 2px 8px rgba(230, 162, 60, 0.3);
  }

  &.prod {
    background: linear-gradient(135deg, #f56c6c, #ff7675);
    box-shadow: 0 2px 8px rgba(245, 108, 108, 0.3);
  }
}

// 状态指示器
.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;

  &.online {
    background: #67c23a;
    box-shadow: 0 0 6px rgba(103, 194, 58, 0.6);
  }

  &.offline {
    background: #f56c6c;
    box-shadow: 0 0 6px rgba(245, 108, 108, 0.6);
  }
}

// 响应式网格
.responsive-grid {
  display: grid;
  gap: 20px;

  &.cols-1 {
    grid-template-columns: 1fr;
  }

  &.cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  &.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  &.cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  @media (max-width: 1200px) {
    &.cols-4 {
      grid-template-columns: repeat(3, 1fr);
    }
  }

  @media (max-width: 768px) {

    &.cols-3,
    &.cols-4 {
      grid-template-columns: repeat(2, 1fr);
    }
  }

  @media (max-width: 480px) {

    &.cols-2,
    &.cols-3,
    &.cols-4 {
      grid-template-columns: 1fr;
    }
  }
}
